import request from '@/utils/request'

// 查询订单保险列表
export function listInsure(query) {
  return request({
    url: '/order/insure/list',
    method: 'get',
    params: query
  })
}

// 查询订单保险详细
export function getInsure(id) {
  return request({
    url: '/order/insure/' + id,
    method: 'get'
  })
}

// 新增订单保险
export function addInsure(data) {
  return request({
    url: '/order/insure',
    method: 'post',
    data: data
  })
}

// 修改订单保险
export function updateInsure(data) {
  return request({
    url: '/order/insure',
    method: 'put',
    data: data
  })
}

// 删除订单保险
export function delInsure(id) {
  return request({
    url: '/order/insure/' + id,
    method: 'delete'
  })
}


// 删除订单保险
export function reOrder(id) {
  return request({
    url: '/order/insure/reOrder/' + id,
    method: 'post'
  })
}
// 删除订单保险
export function loadpoint(orderId) {
  return request({
    url: '/order/insure/point/' + orderId,
    method: 'post'
  })
}


// 删除订单保险
export function queryAndReOrder(id) {
  return request({
    url: '/order/insure/queryAndReOrder/' + id,
    method: 'post'
  })
}

// 导出订单保险
export function exportInsure(query) {
  return request({
    url: '/order/insure/export',
    method: 'get',
    params: query
  })
}
